<?php

Yii::import('zii.widgets.CPortlet');

class NewsBox extends CPortlet
{
	
    public $newsModel;
    public $headlines;
    public $countLimit = 4;
	public function init()
	{
        /**
         * sent the announcement data to the view
         * @author : nonglei
         * @date   : 15/03/2014
         */
        $this->newsModel = News::model()->findAll("newstype_id = 1 and status = 1 ORDER BY priority DESC");
        $this->headlines = News::model()->findAll("newstype_id = 5 and status = 1 ORDER BY priority DESC");
        // $this->contentCssClass="pictureNewsBox";
		$cs = Yii::app()->getClientScript();
    //   $cs->registerCssFile(Yii::app()->baseUrl.'/css/picturesnews.css');
	//	$cs->registerScriptFile(Yii::app()->baseUrl.'/js/picturesnews.js');
        parent::init();
	}
	protected function renderContent()
	{
		$this->render('newsbox');
	}
}

?>
